-- @owner: @zym_2025
-- @date: 2025/07/29
-- @testpoint: 事务回滚后使用rowcount_big()

@connect PrimaryDbDmode;

--step1:建表;expect:成功
drop table if exists t_rowcount_0018_01;
create table t_rowcount_0018_01(id int,name varchar(10));

--step2:insert后查询rowcount_big();expect:返回3
BEGIN;
insert into t_rowcount_0018_01 values(1,'zhangsan'),(2,'lisi'),(3,'wangwu');
SELECT rowcount_big();
ROLLBACK;
/

--step3:rollback后查询rowcount_big();expect:返回0
BEGIN;
insert into t_rowcount_0018_01 values(1,'zhangsan'),(2,'lisi'),(3,'wangwu');
ROLLBACK;
/
SELECT rowcount_big();

--step4:commit后查询rowcount_big();expect:返回0
BEGIN;
insert into t_rowcount_0018_01 values(1,'zhangsan'),(2,'lisi'),(3,'wangwu');
commit;
/
SELECT rowcount_big();

--step5:清理环境
drop table if exists t_rowcount_0018_01;